package com.demo.forum.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@Data
@ApiModel("用户信息")
public class User {
    @ApiModelProperty("用户id")
    private Long id;
    @ApiModelProperty("用户名")
    private String username;

    @JsonIgnore
    private String password;
    @ApiModelProperty("昵称")
    private String nickname;
    @ApiModelProperty("电话号")
    private String phoneNum;
    @ApiModelProperty("邮箱")
    private String email;
    @ApiModelProperty("性别")
    private Byte gender;
    @JsonIgnore
    private String salt;
    @JsonInclude(JsonInclude.Include.ALWAYS)
    @ApiModelProperty("头像地址")
    private String avatarUrl;
    @ApiModelProperty("文章数量")
    private Integer articleCount;
    @ApiModelProperty("是否为管理员")
    private Byte isAdmin;
    @ApiModelProperty("备注")
    private String remark;

    private Byte state;
    @JsonIgnore
    private Byte deleteState;
    @ApiModelProperty("注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;


}